<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>权限管理</title>

</head>
<body>
<table>
	<thead>
		<tr>
			<td style="width: 40px;">序号</td>
			<td style="width: 70px;">权限名称</td>
			<td style="width: 40px;">状态</td>
			<td style="width: 200px;">权限URL</td>
			<td style="width: 200px;">备注</td>
			<td style="width: 40px;">编辑</td>
			<td style="width: 40px;">操作</td>
			<td style="width: 40px;">角色操作</td>
		</tr>
	</thead>
	<tbody>
		<s:iterator value="pageView.records" var="power_list" status="st">
			<tr id="rowNum_${st.index}">
				<td>${power_list.id }</td>
				<td>${power_list.name }</td>
				<td><s:if test="#power_list.state==1">活动</s:if><s:else>锁定</s:else></td>
				<td>${power_list.url}<s:if test="#power_list.url==null">顶级父类</s:if></td>
				<td>${power_list.remarks }</td>
				<td><input  class="role" type="image" src="/image/admin/edit.gif" onclick="editPower(${pageView.currentpage},'rowNum_${st.index}')"/></td>
				<td>
					<s:if test="#power_list.state==1">
						<input  class="role" type="image" src="/image/admin/64.gif" onclick="locked(${pageView.currentpage},0,${power_list.id })"/>
					</s:if><s:else>
						<input  class="role" type="image" src="/image/admin/23.gif" onclick="locked(${pageView.currentpage},1,${power_list.id })"/>
					</s:else>
				</td>
				<td>
					<input class="role" type="image" src="/image/admin/icon-login-seaver.gif" onclick="openRoles(${power_list.id},${power_list.parent})"> 
				</td>
			</tr>
		</s:iterator>
	</tbody>
	<tfoot>
		<tr>
			<td colspan="10">
				<font>当前页:第${pageView.currentpage}页 | 总记录数:${pageView.totalrecord}条 | 每页显示:${pageView.maxrecord}条 | 总页数:${pageView.totalpage}页</font>　
			</td>
		</tr>
		<tr>
			<td colspan="10">
				<c:forEach begin="${pageView.pageindex.startindex}" end="${pageView.pageindex.endindex}" var="page">
				    <c:if test="${pageView.currentpage==page}"><b><font color="#00ffff">${page}</font></b></c:if>
				    <c:if test="${pageView.currentpage!=page}"><a href="#"  onclick="userManager('/control/mapping/power_allPower.go?currentPage=${page}')">[${page}]</a></c:if>
				</c:forEach>
			</td>
		</tr>
	</tfoot>
</table>
</body>
</html>